<template>
  <div>
    <el-form ref="form" class="from" label-width="100px">
      <el-row :gutter="20">
        <el-col :span="10">
          <el-form-item label="填报单位：">
            <span>{{ smpMoveInventory.reportInOrgName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="10" :offset="2">
          <el-form-item label="部门：">
            <span>{{ smpMoveInventory.reportOrgDeptName }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="10">
          <el-form-item label="移库单编号：">
            <span>{{ smpMoveInventory.moveInventoryCode }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="10" :offset="2" class="ellipsis-3">
          <el-form-item label="移库单名称：">
            <span :title="smpMoveInventory.moveInventoryName">{{
                smpMoveInventory.moveInventoryName
              }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="10">
          <el-form-item label="原仓库：" class="ellipsis-3">
            <span :title="smpMoveInventory.originalWarehouseName">{{
                smpMoveInventory.originalWarehouseName
              }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="10" :offset="2">
          <el-form-item label="目标仓库：">
            <span>{{ smpMoveInventory.targetWarehouseName }}</span>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row :gutter="20">
        <el-col :span="10">
          <el-form-item label="是否跨项目：">
            <span>
              {{
                smpMoveInventory.isAcrossProject | isAcrossProjectFormatter
              }}</span
            >
          </el-form-item>
        </el-col>
        <el-col :span="10" :offset="2">
          <el-form-item label="分类名称：">
            <span>{{ smpMoveInventory.categoryName }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="10">
          <el-form-item label="目标单位部门：" label-width="95px">
            <span>{{
                smpMoveInventory.targetOrgDeptName
              }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="10" :offset="2">
          <el-form-item label="附件张数：">
            <span>{{
                smpMoveInventory.filesNumber
              }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="10">
          <el-form-item label="移库数量：">
            <span>{{
                smpMoveInventory.moveInventoryCount | moveInventoryCount
              }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="10" :offset="2">
          <el-form-item label="移库金额：">
            <span>{{
                smpMoveInventory.moveInventoryMoney | moveInventoryMoney
              }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="10">
          <el-form-item label="编制日期：">
            <span>{{ smpMoveInventory.reportTime }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="10" :offset="2">
          <el-form-item label="编制人：">
            <span>{{ smpMoveInventory.reportUsername }}</span>
          </el-form-item>
        </el-col>
      </el-row>

      <el-col :span="22">
        <el-form-item label="业务事由：">
          <span>{{ smpMoveInventory.businessReason }}</span>
        </el-form-item>
      </el-col>

      <el-col :span="22">
        <el-form-item label="备注：">
          <span>{{ smpMoveInventory.remark }}</span>
        </el-form-item>
      </el-col>
    </el-form>
  </div>
</template>

<script>
import {formatNumber} from "@/basa/utils";

export default {
  props: {
    smpMoveInventory: {
      type: Object
    }
  },
  data() {
    return {};
  },
  created() {
    // console.log(this.$parent.smpMoveInventory, "aaaaaaaaaaa");
  },
  filters: {
    moveInventoryMoney(num) {
      return Number(num).toFixed(2);
    },
    moveInventoryCount(num) {
      return formatNumber(num, 3);
    },
    // 是否跨项目格式化
    isAcrossProjectFormatter(data) {
      let str = {0: "否", 1: "是"};
      return str[data] ? str[data] : "";
    }
  },
  methods: {}
};
</script>
<style lang="scss" scoped>
.from {
  margin-left: 80px;
}
</style>
